package br.inf.battleship.v02;

import java.awt.Point;

public class Ship {

    private String name;
    private int size;
    private int destroyedParts = 0;
    private char direction;
    private Point position;
    private int type;
    public Ship(String name, int type, int size) {
        this.name = name;
        this.type = type;
        this.size = size;
    }

   public int getType() {
        return type;
    }
    public String getName() {
        return name;
    }
    public int getSize() {
        return size;
    }

    public char getDirection() {
        return direction;
    }

    public void setDirection(char direction) {
        this.direction = direction;
    }
    
    public void sumDestroyedParts(int sum) {
        this.destroyedParts += sum ;
    }

    public void setPosition(Point position) {
        this.position = position;
    }

    public Point getPosition() {
        return position;
    }

    public int getDestroyedParts() {
        return destroyedParts;
    }

    public boolean isAlive(){
        return (size != destroyedParts);
    }
}
